Skip to content

feat: demo custom transitions with Motion and el.animate - #1130

Draft
tembo[bot] wants to merge 2 commits into
mainfrom
tembo/motion-demos
Draft

tembo[bot] wants to merge 2 commits into
mainfrom
tembo/motion-demos

Conversation

@tembo

@tembo tembo Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Custom transition: Motion: the popmotion + stylefire demo is replaced with a spring transition from Motion (animate(from, to, { type: 'spring' })).
  • Custom transition: el.animate (new, #custom-transition-el-animate): a custom transition with no library. Element.animate() can't animate scroll positions, so the element scrolls instantly and its content is animated with a transform from where it was (FLIP). Clicking a new button mid-animation carries on smoothly.
  • Both demos share one component (ExampleCustomTransition) and show hand-written source, so the code shown isn't minified.
  • Dependencies:
    • Removed popmotion and stylefire, added motion.
    • smooth-scroll-into-view-if-needed goes from ^1.1.33 to ^2.0.2 (the site was still on v1).
    • Raised the minimum versions of scroll-into-view-if-needed and compute-scroll-into-view.
  • Fixes:
    • The footer GitHub link pointed to stipsan/ and now points to the scroll-into-view org.
    • Fixed the "scrollIntoVIew" typo.
    • Number literals in code samples rendered as grey pills because Bulma's .number class clashed with the highlighter's tokens.
  • Updated the Cypress spec for both sections.

Testing

pnpm typecheck and pnpm build pass. I also checked in Chromium that both demos animate and end with the chosen emoji centered, for each button and both inline options.


Want tembo to make any changes? Add a comment with @tembo and i'll get back to work!

View on Tembo  Review in Tembo  View Agent Settings

Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
@tembo tembo Bot added the tembo Pull request created by Tembo label Nov 11, 2026
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scroll-into-view-dev Ready Ready Preview Nov 11, 2026 5:33pm UTC

Request Review

Co-authored-by: Cody <81981+stipsan@users.noreply.github.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmotion@​14.12.010010010098100

View full report

This branch was successfully deployed

1 active deployment
Preview — 119823b1 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tembo Pull request created by Tembo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant